#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("middle.in" , "r" , stdin);
	freopen("middle.out" , "w" , stdout);
	int N , a[10010];
	cin >> N;
	for(int i = 1 ; i <= N ; i++){
		cin >> a[i];
	}
	sort(a + 1 , a + N + 1);
	cout << a[(N + 1) / 2] << endl;
	return 0;
}